﻿CREATE PROCEDURE [ServiceEngine].[GetSystemInstance]
	@ID uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	N.[EntityID] as SystemInstanceID, N.[EntityName] as [Name], SI.SystemID, SI.OwnerName, SI.URI, N.EntityDescription as Description, SI.OwnerContact, SI.PolicyID, SI.Port
	FROM	[ServiceEngine].SystemInstances SI
	JOIN	[ServiceEngine].Names N on N.[EntityID] = SI.InstanceID and N.[EntityTypeID] = 14
	WHERE	SI.InstanceID = @ID

END